/**
 * Created by 春旺 on 2017/3/24.
 */
//*********************************************************************************************************************
//  Grade.java         Java Foundations
//
// Represents a school grade.
//*********************************************************************************************************************
public class Grade
{
    private  String name;
    private  int lowerBound;

    //------------------------------------------------------------------------------------------------------------------
    // Constructor: Sets up this Grade object with the specified
    // grade name and numeric lower bound .
    //------------------------------------------------------------------------------------------------------------------
    public Grade (String grade, int cutoff)
    {
        name = grade;
        lowerBound = cutoff;

    }
    //------------------------------------------------------------------------------------------------------------------
    // Returns a string representation of this grade.
    //------------------------------------------------------------------------------------------------------------------
    public String toString()
    {
        return name + "\t" + lowerBound;
    }
    //------------------------------------------------------------------------------------------------------------------
    // Name mutator
    //------------------------------------------------------------------------------------------------------------------
    public void setName (String grade)
    {
        name = grade;
    }
    //------------------------------------------------------------------------------------------------------------------
    //Name accessor.
    //------------------------------------------------------------------------------------------------------------------

    public String getName()
    {
        return name;
    }
    //------------------------------------------------------------------------------------------------------------------
    //Lower bond accessor.
    //------------------------------------------------------------------------------------------------------------------

    public int getLowerBound()
    {
        return lowerBound;
    }
}
